<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
  <%@ page import="fy.bean.*,java.util.*,java.io.*" %>  
<%
request.setCharacterEncoding("utf-8");

String category = request.getParameter("category");
String title = request.getParameter("title");
String content = request.getParameter("data");
String picture = request.getParameter("picture");
String author = request.getParameter("author");
int homepage = Integer.parseInt(request.getParameter("homepage")); 
String source = request.getParameter("source");
String txtDate = request.getParameter("txtDate");
int puton = Integer.parseInt(request.getParameter("puton"));
String externallinks=request.getParameter("externallinks");
String categoryname = request.getParameter("categoryname");
int id = Integer.parseInt(request.getParameter("id"));


System.out.print("updata.jsp : id:"+id+"+category :"+category +"+homepage :"+homepage+"+source :"+source
		+"+picture :"+picture+"+author :"+author+"+title :"+title);
System.out.println("content" + content);
WhzbBean whzb = new WhzbBean();
if(whzb.doUpdata(category,title,content,picture,author,homepage,source,txtDate,puton,externallinks,categoryname,id)){
	response.setCharacterEncoding("utf-8");
	 PrintWriter pout = response.getWriter();
	 pout.print("true");
	 pout.flush();
	 pout.close();
	}else{
	 response.setCharacterEncoding("utf-8");
	 PrintWriter pout = response.getWriter();
	 pout.print("false");
	 pout.flush();
	 pout.close();
	 //response.sendRedirect("login.html");
	};

%>    
